<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="box">
        <button @click="num++">++</button>
        <div v-no1="num">
            <div v-for="i in num">{{i}}</div>
        </div>
    </div>
</body>
<script src="./js/vue.js"></script>
<script>
    new Vue({
        el:'#box',
        data:{
            num:5,
        },
        directives:{
            no1(dom,json,newv,oldv){
                console.log(dom,json,newv,oldv);
                
            }
        }
    })
</script>
</html>